package cn.edu.zafu.bigdata.YinMingyan.chapter06;

public class TestAge {
    public static void main(String[] args) {
        int[] testAges = {16, 17, 18, 19, 20}; // 包含两个个未成年年龄

        for (int age : testAges) {
            try {
                AgeChecker.checkAge(age);
            } catch (InvalidAgeException e) {
                System.out.println(e.getMessage());
            }
        }
    }
}


